-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf: only calculate participants for autocomplete when needed #55460
base: main
Are you sure you want to change the base?
perf: only calculate participants for autocomplete when needed #55460
Conversation
Reducing work by using the correct function as we are only interested in personal details here
I didn't had time to record videos on all platforms, would appreciate if the reviewer could help out here - thanks!! 🙏 |
@allroundexperts Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@hannojg Conflicts. |
…er-list-only-get-participants-when-needed-2
thanks, fixed the conflicts! I think its best to review this pr once: has been merged, as this PR is based off of it |
…er-list-only-get-participants-when-needed-2
Okay, this one is good for review now! |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
@hannojg Can you please resolve conflicts? |
Bump @hannojg |
Hey sorry, will update next week, currently OOO! |
@hannojg Are you back yet? |
Explanation of Change
Warning
Based on this PR which needs to be merged first:
Two performance improvements were applied here:
getValidOptions
to onlygetValidPersonalDetailOption
. When calculating a list of participants for auto complete inSearchRouterList
, only use this function. This way we avoid including calculating valid report options (which we don't need here)from:
orto:
search keyword is usedThis improves performance as for the default case of opening search we are skipping one expensive
getValidOptions
call!The improvement can be seen by the
open_search
metric (average of 10 runs on main VS branch):This branch:
1482ms
Main branch:
1623ms
140ms
/-8,68%
improvementFixed Issues
$ #46590
PROPOSAL:
Tests
from: [Your Name]
and make sure an auto suggestion with your name shows upto:
and make sure personal details are getting auto suggestedOffline tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
CleanShot.2025-01-19.at.21.30.23.mp4
Android: mWeb Chrome
CleanShot.2025-01-19.at.21.30.23.mp4
iOS: Native
CleanShot.2025-01-19.at.21.30.23.mp4
iOS: mWeb Safari
CleanShot.2025-01-19.at.21.30.23.mp4
MacOS: Chrome / Safari
CleanShot.2025-01-19.at.21.30.23.mp4
MacOS: Desktop
CleanShot.2025-01-19.at.21.30.23.mp4